<form id="add-form" class="form-horizontal form-ajax" role="form" data-toggle="validator" method="POST" action="">
    {:token()}
    <div class="form-group">
        <label for="commission" class="control-label col-xs-12 col-sm-2">{:__('手续费%')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input type="text" class="form-control" id="commission" name="row[commission]" value="{$row.commission|htmlentities}" data-rule="required" />
        </div>
    </div>
    <div class="form-group">
        <label for="appid" class="control-label col-xs-12 col-sm-2">{:__('微信支付appid')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input type="text" class="form-control" id="appid" name="row[appid]" value="{$row.appid|htmlentities}" data-rule="required" />
        </div>
    </div>
    <div class="form-group">
        <label for="app_secret" class="control-label col-xs-12 col-sm-2">{:__('微信小程序app_secret')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input type="text" class="form-control" id="app_secret" name="row[app_secret]" value="{$row.app_secret|htmlentities}" data-rule="required" />
        </div>
    </div>
    <div class="form-group">
        <label for="key" class="control-label col-xs-12 col-sm-2">{:__('微信支付key v2')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input type="text" class="form-control" id="key" name="row[key]"  value="{$row.key|htmlentities}" data-rule="required" />
        </div>
    </div>

    <div class="form-group">
        <label for="notify_url" class="control-label col-xs-12 col-sm-2">{:__('回调')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input type="text" class="form-control" id="notify_url" name="row[notify_url]"  value="{$row.notify_url|htmlentities}" data-rule="required" />
        </div>
    </div>
    <div class="form-group">
        <label for="company" class="control-label col-xs-12 col-sm-2">{:__('分账公司名')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input type="text" class="form-control" id="company" name="row[company]"  value="{$row.company|htmlentities}" data-rule="required" />
        </div>
    </div>
    <div class="form-group">
        <label for="mch_id" class="control-label col-xs-12 col-sm-2">{:__('商户号')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input type="text" class="form-control" id="mch_id" name="row[mch_id]"  value="{$row.mch_id|htmlentities}" data-rule="required" />
        </div>
    </div>
    <div class="form-group">
        <label for="key_v3" class="control-label col-xs-12 col-sm-2">{:__('微信支付key v3')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input type="text" class="form-control" id="key_v3" name="row[key_v3]"  value="{$row.key_v3|htmlentities}" data-rule="required" />
        </div>
    </div>
    <div class="form-group">
        <label for="serial_no" class="control-label col-xs-12 col-sm-2">{:__('微信支付serial_no')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input type="text" class="form-control" id="serial_no" name="row[serial_no]"  value="{$row.serial_no|htmlentities}" data-rule="required" />
        </div>
    </div>
    <div class="form-group">
        <label for="c-cert_path" class="control-label col-xs-12 col-sm-2">{:__('cert_path')}:</label>
        <div class="col-xs-12 col-sm-8">
            <div class="input-group">
                <input id="c-cert_path" data-rule="" class="form-control" size="50" name="row[cert_path]" type="text" value="{$row.cert_path|htmlentities}">
                <div class="input-group-addon no-border no-padding">
                    <span><button type="button" id="faupload-cert_path" class="btn btn-danger faupload" data-input-id="c-cert_path" data-mimetype="image/gif,image/jpeg,image/png,image/jpg,image/bmp,pem" data-multiple="false" data-preview-id="p-cert_path"><i class="fa fa-upload"></i> {:__('Upload')}</button></span>
                </div>
                <span class="msg-box n-right" for="c-cert_path"></span>
            </div>
            <ul class="row list-inline faupload-preview" id="p-cert_path"></ul>
        </div>
    </div>
    <div class="form-group">
        <label for="c-key_path" class="control-label col-xs-12 col-sm-2">{:__('key_path')}:</label>
        <div class="col-xs-12 col-sm-8">
            <div class="input-group">
                <input id="c-key_path" data-rule="" class="form-control" size="50" name="row[key_path]" type="text" value="{$row.key_path|htmlentities}">
                <div class="input-group-addon no-border no-padding">
                    <span><button type="button" id="faupload-key_path" class="btn btn-danger faupload" data-input-id="c-key_path" data-mimetype="image/gif,image/jpeg,image/png,image/jpg,image/bmp,pem" data-multiple="false" data-preview-id="p-key_path"><i class="fa fa-upload"></i> {:__('Upload')}</button></span>
                </div>
                <span class="msg-box n-right" for="c-key_path"></span>
            </div>
            <ul class="row list-inline faupload-preview" id="p-key_path"></ul>
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('是否开通')}:</label>
        <div class="col-xs-12 col-sm-8">
            {:build_radios('row[state]', [1=>__('开通'), 2=>__('关闭')], $row['state'])}
        </div>
    </div>
    <div class="form-group hidden layer-footer">
        <label class="control-label col-xs-12 col-sm-2"></label>
        <div class="col-xs-12 col-sm-8">
            <button type="submit" class="btn btn-primary btn-embossed disabled">{:__('OK')}</button>
            <button type="reset" class="btn btn-default btn-embossed">{:__('Reset')}</button>
        </div>
    </div>
</form>
